home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Programming / Source / winterp-1.13 / src-server / Makefile.gen < prev    next >
Encoding:
Makefile  |  1991-10-06  |  14.5 KB  |  354 lines

  1. ################################################################################
  2. #
  3. # File:         Makefile.gen
  4. # RCS:          $Header: Makefile.gen,v 1.2 91/03/25 03:55:07 mayer Exp $
  5. # Description:  Generic Makefile for WINTERP
  6. # Author:       Niels Mayer, HPLabs
  7. # Created:      Mon Oct 23 20:47:37 1989
  8. # Modified:     Sat Oct  5 22:15:42 1991 (Niels Mayer) mayer@hplnpm
  9. # Language:     N/A
  10. # Package:      N/A
  11. # Status:       X11r5 contrib tape release
  12. #
  13. # WINTERP Copyright 1989, 1990, 1991 Hewlett-Packard Company (by Niels Mayer).
  14. # XLISP version 2.1, Copyright (c) 1989, by David Betz.
  15. #
  16. # Permission to use, copy, modify, distribute, and sell this software and its
  17. # documentation for any purpose is hereby granted without fee, provided that
  18. # the above copyright notice appear in all copies and that both that
  19. # copyright notice and this permission notice appear in supporting
  20. # documentation, and that the name of Hewlett-Packard and David Betz not be
  21. # used in advertising or publicity pertaining to distribution of the software
  22. # without specific, written prior permission.  Hewlett-Packard and David Betz
  23. # make no representations about the suitability of this software for any
  24. # purpose. It is provided "as is" without express or implied warranty.
  25. #
  26. # HEWLETT-PACKARD AND DAVID BETZ DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
  27. # SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
  28. # IN NO EVENT SHALL HEWLETT-PACKARD NOR DAVID BETZ BE LIABLE FOR ANY SPECIAL,
  29. # INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  30. # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  31. # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  32. # PERFORMANCE OF THIS SOFTWARE.
  33. #
  34. # See ./winterp/COPYRIGHT for information on contacting the authors.
  35. #
  36. # Please send modifications, improvements and bugfixes to mayer@hplabs.hp.com
  37. # Post XLISP-specific questions/information to the newsgroup comp.lang.lisp.x
  38. #
  39. ################################################################################
  40.  
  41. #
  42. # Note on INCLUDES for Motif 1.0:
  43. # ==============================
  44. # Motif 1.0 does not use the standard X11r4 toolkit, therefore you must
  45. # make sure that you are compiling Motif 1.0 programs with the headers
  46. # associated with Motif 1.0, not the X11r4 headers.
  47. #
  48. # Standard locations for Motif includes are /usr/include/X11 and
  49. # /usr/include/Xm. Note that Motif 1.0 uses a variant of the X11r3 toolkit
  50. # intrinsics headers which are installed in /usr/include/X11. Don't
  51. # confuse these    with the incompatible Xtoolkit intrinsics from X11r4.
  52. #
  53. # IF YOUR INSTALLATION OF MOTIF PLACES THE INCLUDE FILES FOR MOTIF's Xt/Xm
  54. # DIRECTORIES SOMEWHERE OTHER THAN cc's USUAL INCLUDE SEARCH PATH
  55. # (normally -I/usr/include -I.), THEN YOU WILL HAVE TO SET 'INCLUDES' BELOW
  56. # TO THE APPROPRIATE LOCATION.
  57. #
  58. #
  59. # Note on INCLUDES for Motif 1.1:
  60. # ==============================
  61. # Motif 1.1 uses the X11r4 Xlib, libXt, etc, however, Motif 1.1 is not
  62. # included as part of the X11r4 distribution.  Make sure that you either
  63. # have the X11r4 and Motif headers installed, or that you are setting
  64. # INCLUDES so that the appropriate include directories are used.
  65. # IF YOUR INSTALLATION OF MOTIF PLACES THE INCLUDE FILES FOR MOTIF's Xm
  66. # DIRECTORIES SOMEWHERE OTHER THAN cc's USUAL INCLUDE SEARCH PATH
  67. # (e.g. /usr/include/Xm), THEN YOU WILL HAVE TO SET 'INCLUDES' BELOW
  68. # TO THE APPROPRIATE LOCATION.
  69. #            --------------------
  70. # NOTE: if you modify INCLUDES below, you must also do the same 
  71. # modification in xlisp/Makefile.gen
  72. #
  73.  
  74. # INCLUDES = -I. -I/mnt0/src/OSFMotif1.1.1 -I/mnt0/src/OSFMotif1.1.1/X11 -I/mnt0/src/X11r4/mit -I/mnt0/src/X11r4/mit/X11
  75. INCLUDES = -I. -I/usr/include
  76.  
  77.  
  78. #
  79. # Note on LIBS:
  80. #       "-lm" == libm.a:
  81. #        This is required by XLISP since it includes math routines.
  82. #
  83. #    "-lXm" == libXm.a:
  84. #        This library is part of OSF/Motif, it is not included with
  85. #        X11r4. Many systems vendors sell Motif as part of their OS,
  86. #        e.g. HP, IBM, DEC, MIPS, SCO, etc. If you haven't installed
  87. #        Motif on your system, then replace -lXm below with
  88. #        <path>/libXm.a
  89. #
  90. #    "-lXt" == libXt.a:
  91. #        If you are using Motif 1.1, this should be the standard
  92. #        X11r4 Xt Instrinsics library, with MIT patches 1-18, and any
  93. #        additional patches distributed by OSF.
  94. #        If you are using Motif 1.0, make sure that -lXt points to
  95. #        Motif 1.0's libXt.a, perhaps by specifying <path>/libXt.a.
  96. #        DO NOT USE libXt.a from X11r4 with Motif 1.0 -- they are
  97. #        incompatible.
  98. #
  99. #    "-lX11" == libX11.a:
  100. #        If you are using Motif 1.1, this is the standard X11r4
  101. #        X11 library, or the X11 library supplied by your vendor.
  102. #        For Motif 1.0, you should probably use the X11 library
  103. #        supplied by your vendor (e.g. -lX), although the X11r4
  104. #        libX11.a should work too.
  105. #
  106. #    "-lPW" == libPW.a:
  107. #        This library is required by Motif's file selection box widget
  108. #        on some brands of Unix, such as HPUX, MIPS, and other systems
  109. #        that I am not familiar with. Note that this library may or
  110. #        may not be required for other OS's. See    the Motif documentation
  111. #        for your particular installation of Motif for details.
  112. #
  113. #    "-lmalloc" == libmalloc.a:
  114. #        I've been using this fast malloc library on HPUX. When
  115. #        used in conjuction with Motif, -lmalloc causes a tremendous
  116. #        improvement in the overall application performance. Supposedly
  117. #        for HPUX 8.0, the standard malloc will be faster, though...
  118. #
  119.  
  120. # LIBS = /mnt0/src/OSFMotif1.1.1/lib/Xm/libXm.a /mnt0/src/X11r4/mit/lib/Xt/libXt.a /mnt0/src/X11r4/mit/lib/X/libX11.a -lPW -lm
  121. # LIBS = -lXm -lXt -lX11 -lPW -lm -lmalloc
  122. LIBS = -lXm -lXt -lX11 -lm
  123.  
  124.  
  125. #
  126. # Note on DEFINES:
  127. # (1) -DWINTERP: xlisp/xlisp.h and xlisp/xldmem.h (which are included by all
  128. # WINTERP files) have '#ifdef WINTERP' surrounding changes made to XLISP
  129. # for use by WINTERP: you MUST compile with -DWINTERP or nothing will work.
  130. #
  131. # (2) -D_NO_PROTO: this is required by Motif 1.1 if you are using a
  132. # non-ANSI-C compiler. Eventually everybody will have an ANSI C compiler
  133. # and at that point this flag should be removed.
  134. #
  135. # Other defines that may be required: See Imake rules for your particular
  136. # machine to find out whether -DMALLOC_0_RETURNS_NULL is required
  137. # for linking with the fast malloc library "-lmalloc". Some machines
  138. # don't have a fast malloc library, in which case, don't bother.
  139. #
  140. # WINTERP uses BSD networking to implement the eval-server. Some machines
  141. # don't include BSD stuff by default. You should check the Imake rules
  142. # for your particular machine to see if you need to define things like
  143. # -DBSD or -DSYSV. IBM AIX 3.1 supposedly requires "-D_BSD" and also requires
  144. # linking with libbsd.a
  145. #            --------------------
  146. # NOTE: if you modify DEFINES below, you must also do the same 
  147. # modification in xlisp/Makefile.gen
  148. #
  149.  
  150. # DEFINES = -DWINTERP -DSYSV -Dhpux -DMALLOC_0_RETURNS_NULL -D_NO_PROTO $(USER_DEFINES)
  151. DEFINES = -DWINTERP -D_NO_PROTO $(USER_DEFINES)
  152.  
  153. #
  154. # Include any machine-specific compiler options in CFLAGS
  155. #
  156.  
  157. # CFLAGS = $(INCLUDES) -Wc,-Nd4000,-Ns3300,-Ne700,-Np1000 $(DEFINES)
  158. CFLAGS = $(INCLUDES) $(DEFINES)
  159.  
  160. #
  161. # Some machines (Sun?) have buggy optimizers that make the programs behave
  162. # strangely. Turn off optimization if you suspect problems, or if you have a
  163. # known flaky compiler.
  164. #
  165.  
  166. OPTIMIZER = -O
  167.  
  168.  
  169. ##############################################################################
  170. LINT = /usr/bin/lint
  171. .SUFFIXES: .ln .c
  172. .c.ln:
  173.     $(LINT) -c $*.c $(DEFINES)
  174.  
  175.  
  176. ##############################################################################
  177. .c.o:
  178.     $(CC) -c $(OPTIMIZER) $*.c $(CFLAGS)
  179.  
  180.  
  181. ##############################################################################
  182. HDRS          = app_fundecl.h \
  183.         app_funextn.h \
  184.         app_funidx.h \
  185.         config.h \
  186.         user_prefs.h \
  187.         w_XmString.h \
  188.         w_funtab.h \
  189.         winterp.h
  190.  
  191. SRCS          = utils.c \
  192.         w_XmString.c \
  193.         w_callbacks.c \
  194.         w_classes.c \
  195.         w_evnthndlr.c \
  196.         w_funtab.c \
  197.         w_libXm.c \
  198.         w_libXt.c \
  199.         w_pixmap.c \
  200.         w_resources.c \
  201.         w_savedobjs.c \
  202.         w_timeouts.c \
  203.         w_txlations.c \
  204.         w_utils.c \
  205.         wc_ArrowB.c \
  206.         wc_BulletinB.c \
  207.         wc_CascadeB.c \
  208.         wc_Command.c \
  209.         wc_DrawingA.c \
  210.         wc_DrawnB.c \
  211.         wc_FileSB.c \
  212.         wc_Form.c \
  213.         wc_Frame.c \
  214.         wc_Label.c \
  215.         wc_List.c \
  216.         wc_MainW.c \
  217.         wc_MessageB.c \
  218.         wc_PanedW.c \
  219.         wc_PushB.c \
  220.         wc_RowColumn.c \
  221.         wc_SHELL.c \
  222.         wc_Scale.c \
  223.         wc_ScrollBar.c \
  224.         wc_ScrolledW.c \
  225.         wc_SelectioB.c \
  226.         wc_Separator.c \
  227.         wc_Text.c \
  228.         wc_ToggleB.c \
  229.         wc_WIDGET.c \
  230.         winterp.c
  231.  
  232. OBJS          = $(SRCS:.c=.o)
  233.  
  234. LINTS          =    $(SRCS:.c=.ln)
  235.  
  236. ##############################################################################
  237. DEST          = .
  238.  
  239. INSTALL          = install
  240.  
  241. LD          = $(CC)
  242.  
  243. LDFLAGS          = 
  244.  
  245. MAKEFILE      = Makefile.gen
  246.  
  247. PRINT          = pr
  248.  
  249. PROGRAM       = winterp
  250.  
  251. SHELL          = /bin/sh
  252.  
  253. all::        $(PROGRAM)
  254.  
  255. $(PROGRAM):     $(OBJS) xlisp/libXlisp.a
  256.         @echo "Linking $(PROGRAM) ..."
  257.         $(LD) $(LDFLAGS) $(OBJS) xlisp/libXlisp.a $(LIBS) -o $(PROGRAM)
  258.         @echo "done"
  259.  
  260. # XmGraph::
  261. #         @echo "Making winterp+XmGraph ..."
  262. #         @echo "Be sure to delete all .o files if you previously compiled w/o -DHP_GRAPH_WIDGET!"
  263. #         (make -f Makefile.gen "USER_DEFINES=-DHP_GRAPH_WIDGET $(USER_DEFINES)" "OPTIMIZER=$(OPTIMIZER)" winterp+XmGraph)
  264. # winterp+XmGraph:    $(OBJS) wc_XmGraph.o xlisp/libXlisp.a
  265. #             @echo "Linking winterp+XmGraph ..."
  266. #             $(LD) $(LDFLAGS) $(OBJS) wc_XmGraph.o xlisp/libXlisp.a -lXm -lgraph -lXt -lX11 -lPW -lm -lmalloc -o winterp+XmGraph
  267. #             @echo "done"
  268.             
  269. xlisp/libXlisp.a::
  270.     (cd $(@D) ; make -f Makefile.gen "USER_DEFINES=$(USER_DEFINES)" "OPTIMIZER=$(OPTIMIZER)" $(@F) ; cd ..)
  271.  
  272. lint:    $(LINTS) xlisp/llib-Xlisp.ln
  273.     $(LINT) $(LINTS) xlisp/llib-Xlisp.ln -lXm -lXt -lX11 -lm > lint 2>&1
  274.  
  275. xlisp/llib-Xlisp.ln::
  276.     (cd $(@D) ; make -f Makefile.gen "USER_DEFINES=$(USER_DEFINES)" $(@F) ; cd ..)
  277.  
  278. TAGS: $(HDRS) $(SRCS) xlisp/libXlisp.a
  279.     etags -et $(HDRS) $(SRCS) xlisp/*.h xlisp/*.c
  280.  
  281. cscope::
  282.     cscope-x -I. -Ixlisp/. -S. -S xlisp/. -name Winterp -iconic & 
  283.  
  284. run:;        winterp
  285.  
  286. clean:;        rm -f $(OBJS) $(LINTS) core
  287.  
  288. clobber:;    rm -f $(OBJS) $(PROGRAM)  $(LINTS) lint TAGS core tags
  289.  
  290. depend:;    mkmf -f $(MAKEFILE) ROOT=$(ROOT)
  291.  
  292. echo:;        @echo $(HDRS) $(SRCS)
  293.  
  294. index:;        ctags -wx $(HDRS) $(SRCS)
  295.  
  296. install:    $(PROGRAM)
  297.         @echo Installing $(PROGRAM) in $(DEST)
  298.         -strip $(PROGRAM)
  299.         if [ $(DEST) != . ]; then \
  300.         (rm -f $(DEST)/$(PROGRAM); $(INSTALL) -f $(DEST) $(PROGRAM)); fi
  301.  
  302. print:;        $(PRINT) $(HDRS) $(SRCS)
  303.  
  304. tags:           $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)
  305.  
  306. update:        $(DEST)/$(PROGRAM)
  307.  
  308. $(DEST)/$(PROGRAM): $(SRCS) $(LIBS) $(HDRS)
  309.         $(MAKE) -f $(MAKEFILE) ROOT=$(ROOT) DEST=$(DEST) install
  310. ###
  311. utils.o:
  312. w_XmString.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_XmString.h
  313. w_callbacks.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  314. w_classes.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  315. w_evnthndlr.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  316. w_funtab.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h app_funextn.h app_fundecl.h
  317. w_libXm.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h 
  318. w_libXt.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  319. w_pixmap.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  320. w_resources.o:  winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_XmString.h 
  321. w_savedobjs.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  322. w_timeouts.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  323. w_txlations.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  324. w_utils.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  325. wc_ArrowB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  326. wc_BulletinB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  327. wc_CascadeB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  328. wc_Command.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h w_XmString.h
  329. wc_DrawingA.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  330. wc_DrawnB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  331. wc_FileSB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h w_XmString.h
  332. wc_Form.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  333. wc_Frame.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  334. wc_Label.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  335. wc_List.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h w_XmString.h
  336. wc_MainW.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  337. wc_MessageB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  338. wc_PanedW.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  339. wc_PushB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  340. wc_RowColumn.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  341. wc_SHELL.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  342. wc_Scale.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  343. wc_ScrollBar.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  344. wc_ScrolledW.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  345. wc_SelectioB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h w_XmString.h
  346. wc_Separator.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  347. wc_Text.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  348. wc_ToggleB.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  349. wc_WIDGET.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  350. # wc_XmGraph.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h w_funtab.h app_funidx.h
  351. winterp.o:    winterp.h user_prefs.h ../src-server/config.h xlisp/xlisp.h xlisp/xldmem.h
  352.